1. Field of the Invention
The present invention relates to a numerical controller with a machining time prediction unit and a machining error prediction unit.
2. Description of the Related Art
In machining a workpiece using a machine tool, in general, if the machining time is reduced or if the machining speed is increased, the machining precision is degraded. If the machining time is increased or if the machining speed is reduced, in contrast, the machining precision is improved. In the workpiece machining, the machining precision is more important than the machining time. Thus, users who use the machine tool to machine the workpiece wish to be able to machine the workpiece in a minimum machining time with a machining precision within a preset machining error tolerance. It is not easy, however, to ascertain the appropriate machining time and machining error level for the workpiece.
Accordingly, machining is normally performed at a speed within an allowable precision range after trial machining is performed several times for a somewhat longer time. Before machining a workpiece, therefore, users wish to know by simulation how precisely the workpiece will be machined with the machining speed and machining conditions without trial machining. Further, users earnestly wish to know by simulation the machining speed and machining conditions with which the workpiece can be machined with a machining precision within a machining error tolerance in a minimum machining time without trial machining.
Principal prior art techniques related to machining time prediction are disclosed in the following patent documents.
(a) Japanese Patent Application Laid-Open No. 2004-227028 (corresponding to U.S. Unexamined Patent Publication No. US2005/0228533A1) discloses a technique in which a machining program is divided into machining processes by simulation, a cycle time is calculated for each of the divided machining processes, and information on the result of the simulation is displayed on a display unit of terminal equipment. Further, Japanese Patent Application Laid-Open No. 2005-301440 discloses a machining time calculator, which can quickly calculate an accurate axis movement time even in machining using a numerical controller having a function to optimally adjust the feed rate and acceleration/deceleration.
Although the machining time is predicted in the techniques disclosed in the above two patent documents, machining errors are not predicted. Therefore, these techniques cannot meet users' demand to know by simulation the precision of the workpiece with the machining speed without trial machining or to know by simulation the machining speed at which the workpiece can be machined with a precision within a machining error tolerance in a minimum machining time without trial machining.
(b) Japanese Patent Application Laid-Open No. 58-35607 (corresponding to U.S. Pat. No. 4,543,625) discloses a numerical controller capable of restricting a machining error in corner cutting and a radial error in circular-arc cutting to tolerances.
In the technique disclosed in the above patent document, the machining error is calculated based on the premise that acceleration/deceleration is performed with exponential characteristics. In modern numerical controllers, however, complicated speed control is performed for smooth acceleration/deceleration characteristics, such as linear and bell-shaped acceleration/deceleration characteristics, as well as the exponential acceleration/deceleration characteristics. Thus, the machining error cannot be predicted by a simple computational formula described in this patent document.
(c) Japanese Patent Application Laid-Open No. 2011-60016 (corresponding to U.S. Unexamined Patent Publication No. US2011/0057599A1) discloses a trajectory display device having a function to accurately quantify an error of a three-dimensional trajectory of a machine tool and display or output the error.
The trajectory display device disclosed in the above patent document comprises a command line segment definition unit and an error calculation unit. The command line segment definition unit defines command line segments that each connect two adjacent points for each command position point. The error calculation unit calculates, as an error of an actual position at each time relative to a command path, the length of the shortest of perpendicular lines drawn from the actual position to the command line segments, individually, or the length of a line segment that connects the actual position and the command position closest to it, whichever is shorter. Data on the actual position is determined by actually operating a drive shaft (servo), not by simulation.
The technique disclosed in the above patent document will now be described with reference to FIG. 1. In this technique, a length from an actual position Qm″ (m=1, 2, . . . ) to a command position Pn (n=1, 2, . . . ) is regarded as an error. In some other case, in contrast, a length from the command position Pn to the actual position Qm″ should be regarded as an error. In machining, for example, a right-angled corner by the technique disclosed in this patent document, as shown in FIG. 1, lengths from actual positions to command positions (indicated by broken lines) are regarded as errors. In this case, however, the length of a perpendicular line (indicated by a dash-dotted line) drawn from a command position P4 at the corner to a line segment that connects actual positions Q4″ and Q5″ is greater. Therefore, the length of this perpendicular line should be regarded as an error. Thus, there is also a case where the length from the command position to the actual position should be regarded as an error, so that the method of error evaluation disclosed in this patent document is unsatisfactory.
According to the technique disclosed in this patent document, moreover, the error is only calculated and displayed or output. Therefore, this technique cannot meet users' demand to know by simulation the precision of the workpiece with the machining speed and machining conditions without trial machining or to determine by simulation the machining speed and machining conditions with which the workpiece can be machined with a precision within a machining error tolerance in a minimum machining time without trial machining.
Conventionally, a numerical controller has a machining condition selecting function. According to this function, machining condition data, including an allowable acceleration and allowable corner speed difference shown in FIG. 2, are previously set as parameters, and the precision data to be used for machining are designated as Rr (r=1 to 10) in the G05.1 block of the program shown in FIG. 3
According to the method shown in FIG. 2, the machining condition data (including allowable acceleration and allowable corner speed difference) are previously set for each of the cases of speed-oriented data (precision data 1) and precision-oriented data (precision data 10), and machining condition data are determined for precision data 2 to 9 intermediate between the precision data 1 and 10 by proportional distribution based on those set values. Although only the two typical machining condition data are described herein, various other machining condition data, such as a jerk (acceleration variation), post-interpolation acceleration/deceleration time constant, etc., can be set in the same manner.
FIG. 3 shows commands for the indication of precision data to be designated among the precision data described above.
“G05. 1Q1” in the first block represents a block for a machining condition selection command, and “r” of “Rr” indicates the precision data to be selected from the precision data 1 to 10 shown in FIG. 2. For example, “r” is set to a small value for rough machining or to a large value for finish machining. It is to be understood here that the machining condition data, including the allowable acceleration, allowable corner speed difference, etc., may be directly commanded or parameter set values for these condition data may be set, instead of designating the precision data using the numbers 1 to 10.
While F-command in the second block is a speed command as a machining command, an actual command speed can be changed into a value, (F-command)×(override value), using an override (1 to 200%). Further, a parameter set speed may be used for a speed command, ignoring the F-command. Furthermore, the F-command in the program may be changed into a command for a modified speed.
If “G05. 1Q1R4” is commanded in the parameter setting shown in FIG. 2, for example, machining is performed with the allowable acceleration of 1,533 (=(6×2,000+3×600)/9) mm/sec2 and the allowable corner speed difference of 800 (=(6×1,000+3×600)/9) mm/min set as parameters for the machining condition data. Alternatively, as described above, these data may be directly commanded or parameter set values corresponding thereto may be set. Although the precision data can be easily commanded by this machining condition selecting function, however, the appropriate machining error level and machining time for each precision data cannot be ascertained.